import request from "@/utils/request";

export const getRoleListAPI = (params) => {
    return request({
        url: '/permission/role',
        params
    })
}

// 用户管理数据列表请求
export const getRoleInfoApi = params => {
    return request({
<<<<<<< HEAD
        url: 'permission/role',
=======
        url: '/permission/role',
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
        method: 'GET',
        params: params
    })
}
// 用户管理 新增 用户项
export const PostRoleInfoApi = data => {
    return request({
<<<<<<< HEAD
        url: 'permission/role',
=======
        url: '/buildpermission/role',
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
        method: 'POST',
        data
    })
}

// 显示状态请求
export const RoleoleInfoApi = data => {
    return request({
<<<<<<< HEAD
        url: `permission/role/${data.id}/${data.hidden}`,
=======
        url: `/permission/role/${data.id}/${data.hidden}`,
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
        method: 'GET',
        data
    })
}
// 查询单个用户项
export const OneRoleInfoApi = data => {
    return request({
<<<<<<< HEAD
        url: `permission/role/${data.id}`,
=======
        url: `/permission/role/${data.id}`,
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
        method: 'GET',
        data
    })
}
// 查询单个用户项
export const PutRoleInfoApi = data => {
    return request({
<<<<<<< HEAD
        url: `permission/role/${data.id}`,
=======
        url: `/permission/role/${data.id}`,
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
        method: 'put',
        data
    })
}
// 删除用户项
export const delRoleInfoApi = id => {
    return request({
<<<<<<< HEAD
        url: 'permission/role/' + id,
=======
        url: '/permission/role/' + id,
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
        method: 'DELETE',
    })
}

export const uploadImg = data => {
    return request({
        url: "/index/upload?mode=base64&type=image",
        method: "POST",
        data
    })
}